home *** CD-ROM | disk | FTP | other *** search
- Path: theory.lcs.mit.edu!wald
- From: wald@theory.lcs.mit.edu (David Wald)
- Newsgroups: comp.lang.c++
- Subject: Re: Beginner Questions
- Date: 12 Jan 1996 17:45:51 GMT
- Organization: Theory of Computation, LCS, MIT
- Message-ID: <WALD.96Jan12124552@woodpecker.lcs.mit.edu>
- References: <03e46273@brazerko.com>
- NNTP-Posting-Host: woodpecker.lcs.mit.edu
- In-reply-to: szarka@brazerko.com's message of Thu, 11 Jan 96 18:37:38 -0500
-
- In article <03e46273@brazerko.com> szarka@brazerko.com (Szarka)
- writes:
- >Except that--and please check my understanding here as I'm a beginner,
- >too--recursive functions cannot be completely expanded inline. Only the
- >first iteration is expanded.
-
- That's compiler-dependent. Some won't inline recursive functions at
- all; some will inline to a given depth (sometimes greater than 1); and
- it's not all that difficult for a compiler to fully inline a
- tail-recursive function. As with any use of "inline", there are no
- platform-independent guarantees.
-
- -David
- --
- ============================================================================
- David Wald http://theory.lcs.mit.edu/~wald/ wald@theory.lcs.mit.edu
- ============================================================================
-